<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>我的订单-订单列表</title>
<link rel="stylesheet" href="__PUBLIC__/Mobile/css/zhanghou.css">
<script src="__PUBLIC__/Mobile/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/Common/Layer/layer.js"></script>
</head>

<body >
<section>
<!--我的订单-->
<div class="lm">
  <a href="javascript:history.back(-1);" style="width:10%;">
    <img src="__PUBLIC__/Mobile/images/return.png" style="height:22px; padding-left:3%; line-height:22px; width:6%; padding-top:2%;" class="left">
  </a>
    <span class="left size20" style="width:85%;">我的订单 </span>
</div>
<div class="Order-form s">
	<a href="{:U('Order/order_list')}">全部</a>
	<a href="{:U('Order/payment_list')}">待付款</a>
	<a href="{:U('Order/receipt_goods')}">待收货</a>
	<a href="{:U('Order/payments_waite')}" class="hover">待评价</a>
	<a href="{:U('Order/order_end')}">待完成</a>
<!--   <a href="#">退货/换货</a> -->
</div>
<div class="shopping-cart">
<script>
  $(function(){
    
      $('.margin-top').each(function(){
          var  goods_num = 0;
          $(this).find('.goods_num').each(function(){
            goods_num += parseInt($(this).val());
          });
          $(this).find('.jian_nub').html(goods_num);
      })
  })
</script>
<foreach name="res" item="vo">
        <ul class="margin-top">
        	<h3 class="s"><span class="l">{$vo.create_time|date="Y-m-d H:i:s",###}</span><span class="r">
           <if condition="$vo.pay_status eq 0">待付款
           <elseif condition="$vo.pay_status eq 3"/>待评价
           <else/>待收货 
           </if> 
          </span></h3>
          <foreach name="vo.result" item="rvo">
            <li><b><img src="__PUBLIC__/Uploads/goods/{$rvo.pic_url}"></b>
            <strong style="width:62%;">
            <p>{$rvo.goods_title}</p>
            </strong>
            <span><p>￥{$rvo.price_new}</p>
            <!-- <del class="gray">{$rvo.price_old}</del> -->
            <p class="gray">x{$rvo.goods_num}</p>
            <input type="hidden" class="goods_num" value="{$rvo.goods_num}">
            </span>
            </li>
            </foreach>
          <p class="Subtotal"><span class="gray">小计(共<span class="jian_nub">1</span>件)：</span><span class="Orange size20">￥{$vo.price_sum}</span></span></p>
          <p class="confirm">
       <!-- <a href="结算.html" class="hover">立即付款</a>
          <a href="javascript:;" onclick="del({$vo.id})">取消订单</a> -->
          <a href="{:U('Order/pingjia')}?orders_id={$vo.id}" >去评价</a>
       </p>
        </ul>
</foreach>



<include file="Public:footer_orders" />




<script>
  function del(a){
    $.ajax({
      data:"id="+a,
      type:"POST",
      url:"{:U('Order/cancel_order')}",
      success:function(msg){
       if(msg == 1){
          parent.layer.msg('操作成功',{icon:1,time:1000},function(){
            window.location.reload();
          });
       }else{
          parent.layer.msg('操作失败',{icon:2,time:2000})
       }

      }
    });
  }
</script>
</div>
</section>
</body>
</html>
